<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <c:set var="ctx" value="${pageContext.request.contextPath}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>线索详情</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<div class="Wrapper">
    <form id="formSet1">
        <div class="fieldset1 tabel_col clearFix">
            <div class="caption">
                <span class="title">客户信息</span>
            </div>
            <div class="fieldBox col_50">
                <div class="label">客户姓名</div>
                <div class="field">
                    <span name="cstMgrNm" id="cstMgrNm"><a
                            href="javascript:showDetail('${odrClueInfoVO.cstId}','${odrClueInfoVO.cstBscInfoVO.cstTypCd}')">${odrClueInfoVO.cstNm}</a>&nbsp;</span>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">身份证</div>
                <div class="field">
                    <span name="cstMgrNm">${odrClueInfoVO.cstBscInfoVO.certNo}&nbsp;</span>
                </div>
            </div>
            <div class="fieldBox col_50">
                <div class="label">性别</div>
                <div class="field">
                    <%--<span name="cstMgrNm" id="cstMgrNm">${odrClueInfoVO.cstBscInfoVO.cstNpBscInfoVO.mp1}&nbsp;</span>--%>
                    <span name="cstMgrNm">${odrClueInfoVO.sex}&nbsp;</span>
                </div>
            </div>
            <div class="fieldBox col_50">
                <div class="label">注册手机号</div>
                <div class="field">
                    <span name="cstMgrNm">${odrClueInfoVO.cstBscInfoVO.cstNpBscInfoVO.mp1}&nbsp;</span>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">登录手机号</div>
                <div class="field">
                    <span>${odrClueInfoVO.usrMp}&nbsp;</span>
                </div>
            </div>
            <div class="fieldBox col_50">
                <div class="label">状态</div>
                <div class="field">
                    <span>${odrClueInfoVO.clueStsCdNm}</span>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">期望贷款金额(万元)</div>
                <div class="field">
                    <span>
                        <c:if test="${!empty odrClueInfoVO.contAmtD}">
                            <fmt:formatNumber type="number" value="${odrClueInfoVO.contAmtD}"  pattern="0.00"/>
                        </c:if>
                    </span>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">车辆所在区域</div>
                <div class="field">
                        <span>${odrClueInfoVO.rgnPrCd}${odrClueInfoVO.rgnCyCd}</span>
                </div>
            </div>

            <div class="fieldBox col_50">
                <div class="label">一级推荐人</div>
                <div class="field">
                    <span name="cstMgrNm">${odrClueInfoVO.oneMp}&nbsp;</span>
                </div>
            </div>
            <div class="fieldBox col_50">
                <div class="label">二级推荐人</div>
                <div class="field">
                    <span name="cstMgrNm">${odrClueInfoVO.twoMp}&nbsp;</span>
                </div>
            </div>
        </div>
    </form>
    
    <%-- ==========================================估值记录====================================================--%>
    <div>
    	<table style="text-align: center;">
    		<tr style="height:25px; width:150px; border: 1px solid #e9e9e9; background-color: #e7fef4;">
    			<td style="height:25px; width:50px; border: 1px solid #e9e9e9;">序号</td>
    			<td style="height:25px; width:120px; border: 1px solid #e9e9e9;">上牌年限</td>
    			<td style="height:25px; width:140px; border: 1px solid #e9e9e9;">新车购置价(万元)</td>
    			<td style="height:25px; width:140px; border: 1px solid #e9e9e9;">估值结果金额(万元)</td>
    		</tr>
    		<c:forEach items="${odrCarValRecordVoList}" var="odrCarValVo" varStatus="status">
    			<tr>
    				<td style="height:25px; width:50px; border: 1px solid #e9e9e9;">${status.index + 1}</td>
	    			<td style="height:25px; width:120px; border: 1px solid #e9e9e9;"><fmt:formatDate value="${odrCarValVo.licDt}" pattern="yyyy-MM"></fmt:formatDate></td>
	    			<td style="height:25px; width:120px; border: 1px solid #e9e9e9;">
	    				<fmt:formatNumber type="number" value="${odrCarValVo.carPriceD}"  pattern=".00"/>
	    			</td>
	    			<td style="height:25px; width:120px; border: 1px solid #e9e9e9;">
	    				<fmt:formatNumber type="number" value="${odrCarValVo.prdAmtD}"  pattern=".00"/>
	    			</td>
    			</tr>
    		</c:forEach>
    		
    		
    	</table>
    	<c:if test="${empty odrCarValRecordVoList}">
   			<div style="text-align: center;height: 25px;line-height: 25px;width: 453px;border: 1px solid #e9e9e9;border-top: 0px;">无记录</div>
   		</c:if>
    </div>
    <%-- ================================此处开始展示备注信息=======================================================--%>
   <%-- <br/><span style="display: inline-block; margin-bottom: 15px;"><b>沟通记录</b></span>--%>
    <%--<div>
        <span>
            <c:if test="${empty remList}">无记录</c:if>
            <c:forEach var="i" items="${remList}">
                <div style="border: 1px solid #e9e9e9; background-color: #e7fef4; padding: 5px; ">
                <p style="margin-bottom: 5px;">  <c:out value="${i.crtUsrNm}"/> &nbsp;&nbsp;&nbsp;&nbsp;
                 <fmt:formatDate value="${i.crtTm}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></p>
                <p>记录：  <c:out value="${i.comment}"/></p>
                </div>
                <br/>
            </c:forEach>
        </span>
    </div>--%>
</div>
<script type="text/javascript">
    function viewAttachments(_id, _orgCd, _typeCd) {
        var urlArray = null;
        //alert(_id);
        $.ajax({
            type: 'get',
            dataType: 'json',
            data: {
                id: _id,
                orgCd: _orgCd,
                typeCd: _typeCd
            },
            url: '<%=path%>/carloan/odrClueInfoVO/viewAttachments.do',
            beforeSend: function () {
                wait_dialog = $.ligerDialog.SQalert({
                    content: '正在查询图片...',
                    SQ_type: "waitting"
                });
            },
            success: function (msg) {
                wait_dialog.close();
                if (msg.success == 1) {
                    //console.log(msg.data);
                    urlArray = msg.data;
                    if (urlArray != null && urlArray != "") {
                        for (img in urlArray) {
                            console.log(urlArray[img]);
                            var li = '<li><img  src="' + urlArray[img] + '" alt=""></li>';
                            $('#dowebok').append(li);
                        }
                        //$('#dowebok').viewer();
                        var viewer = new Viewer(document.getElementById('dowebok'), {
                            hidden: function () {
                                //alert('hidden');
                                urlArray = null;
                                $('#dowebok').html('');
                                viewer.destroy();
                            },
                        });
                        viewer.show();
                    } else {
                        $.ligerDialog.SQalert({
                            content: '该记录没有图片...',
                            SQ_type: "warn"
                        });
                    }
                } else {
                    $.ligerDialog.SQalert({
                        content: msg.info,
                        SQ_type: "error"
                    });
                }
            }
        });
    }

    //查看数据
    function showDetail(_id, _cstTypCd) {
        //1 自然人  2 法人
        if (_cstTypCd == 1) {
            parent.mainApp.f_addTab('tab_customer_np_detail' + _id, '客户详情', '<%=path%>/customer/cstbscinfo/toCustCstBacInfoNpDetailPage.do?id=' + _id);
        } else if (_cstTypCd == 2) {
            parent.mainApp.f_addTab('tab_customer_corp_detail' + _id, '客户详情', '<%=path%>/customer/cstbscinfo/toCustCstBacInfoCorpDetailPage.do?id=' + _id);
        }
    }
</script>
<style type="text/css">
    .viewer-container {
        transform: scale(0.6);
        -webkit-transform: scale(0.6);
        -moz-transform: scale(0.6);
        -o-transform: scale(0.6);
        -ms-transform: scale(0.6);
    }
</style>
</body>
</html>